package com.jy.service.impl;

import com.jy.bean.Lndividual_orders;
import com.jy.bean.Order;
import com.jy.bean.Order_browse;
import com.jy.bean.Orderdetail;
import com.jy.dao.OrderDao;
import com.jy.service.Orderservice;

import java.util.List;

public class OrderSericelmpl implements Orderservice {
    private OrderDao orderDao;

    @Override
    public List<Orderdetail> consigneeList() {
        orderDao = new OrderDao();
        return orderDao.consigneeList();
    }

    @Override
    public Boolean insertOrder(Order order) {
        orderDao = new OrderDao();
        return orderDao.insertOrder(order);
    }

    @Override
    public Boolean insertorderdetail(Order order) {
        orderDao = new OrderDao();
        return orderDao.insertorderdetail(order);
    }

    @Override
    public Integer selectturnover() {
        orderDao = new OrderDao();
        return orderDao.selectturnover();
    }

    @Override
    public boolean UpdateOrderState(String ordernumber) {
        orderDao = new OrderDao();
        return orderDao.UpdateOrderState(ordernumber);
    }

    @Override
    public List<Orderdetail> consigneeByIdList(Integer user_id) {
        orderDao = new OrderDao();
        return orderDao.consigneeByIdList(user_id);
    }

    @Override
    public List<Lndividual_orders> selectByOrdernumber(String ordernumber) {
        orderDao = new OrderDao();
        return orderDao.selectByOrdernumber(ordernumber);
    }

    @Override
    public String selelByconsigneeName(String ordernumber) {
        orderDao = new OrderDao();
        return orderDao.selelByconsigneeName(ordernumber);
    }

    @Override
    public List<Order_browse> order_browseList(String ordernumber) {
        orderDao = new OrderDao();
        return orderDao.order_browseList(ordernumber);
    }

    @Override
    public String selectByordernumber(String ordernumber) {
        orderDao = new OrderDao();
        return orderDao.selectByordernumber(ordernumber);
    }

    @Override
    public boolean MerchantUpdateState(String ordernumber, String state) {
        orderDao = new OrderDao();
        return orderDao.MerchantUpdateState(ordernumber, state);
    }

    @Override
    public boolean update_order(String name) {
        orderDao = new OrderDao();
        return orderDao.update_order(name);
    }

    @Override
    public boolean updateByname_order() {
        orderDao = new OrderDao();
        return orderDao.updateByname_order();
    }

}

